package com.zx.cloud.controller.client;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.domain.Dict;
import com.zx.cloud.model.response.ObjectDataResponse;
import com.zx.cloud.util.Page;

import feign.Headers;

/**
 * @author Alex
 */
@FeignClient(name = DictClient.SERVICE_ID, fallback = DictClientFallback.class)
public interface DictClient {

	/**
	 * eureka service name
	 */
	String SERVICE_ID = "trade-provider";


	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/dict/findDict", method = RequestMethod.POST)
	ObjectDataResponse<Page<Dict>> findDict(Dict Dict);

	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/dict/updateDict", method = RequestMethod.POST)
	ObjectDataResponse<Integer> updateDict(Dict Dict);

	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/dict/addDict", method = RequestMethod.POST)
	ObjectDataResponse<Integer> addDict(Dict Dict);
	
	//查询实体类
	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/dict/queryPageByParent", method = RequestMethod.POST)
	ObjectDataResponse<Page<Dict>> queryPageByParent(Dict Dict);

}
